import 'package:flutter/material.dart';

class ScreenSizeUtils {
  ScreenSizeUtils._();

  static double deviceScreenWidth(BuildContext context) {
    MediaQueryData queryData = MediaQuery.of(context);
    double screenWidth = queryData.size.width;
    return screenWidth;
  }

  static double deviceScreenHeight(BuildContext context) {
    MediaQueryData queryData = MediaQuery.of(context);
    double screenHeight = queryData.size.height;
    return screenHeight;
  }

  // 导航栏高度
  static double navigatBarHeight(BuildContext context) {
    return AppBar().preferredSize.height;
  }

  // 状态栏高度
  static double statusBarHeight(BuildContext context) {
    return MediaQuery.of(context).padding.top;
  }

  // 底部安全区域高度
  static double bottomSafeHeight(BuildContext context) {
    return MediaQuery.of(context).padding.bottom;
  }
}
